Component({
  data: {
    selected: 'index'
  },
  methods: {
    switchTab(e) {
      const value = e.detail.value;
      console.log('e.detail.value',e.detail.value)
      const tabMap = {
        index: '/pages/index/index',
        consult: '/pages/consult/consult',
        profile: '/pages/profile/profile'
      };

      wx.switchTab({
        url: tabMap[value]
      });
    }
  }
}); 